package stack

func NewStack(size int) *Stack {
	sli := make([]byte, size)
	start := SliceToSliceHeader(sli).Data
	s := &Stack{
		Size:     size,
		Space:    sli,
		Sp:       start,
		Bp:       start,
		maxPoint: start + uintptr(size),
	}
	Push[uintptr](s, 0)
	return s
}
